{extend name="admin/base"}
{block name="breadcrumb"}
<div class="page-breadcrumbs">
    <ul class="breadcrumb">
        <li>
            <a href="#">文章管理</a>
        </li>
        <li>
            <a href="{:url('article/ls')}">文章列表</a>
        </li>
        <li class="active">添加文章</li>
    </ul>
</div>
{/block}
{block name="pagebody"}
<div class="page-body">

    <div class="row">
        <div class="col-lg-12 col-sm-12 col-xs-12">
            <div class="widget">
                <div class="widget-header bordered-bottom bordered-blue">
                    <span class="widget-caption">新增文章</span>
                </div>
                <div class="widget-body">
                    <div id="horizontal-form">
                        <form class="form-horizontal" role="form" action="" enctype="multipart/form-data" method="post">
                            <div class="form-group">
                                <label for="title" class="col-sm-2 control-label no-padding-right">文章标题</label>
                                <div class="col-sm-6">
                                    <input class="form-control" id="title" placeholder="" name="title"  type="text">
                                </div>
                                <p class="help-block col-sm-4 red">* 必填</p>
                            </div>

                            <div class="form-group">
                                <label for="author" class="col-sm-2 control-label no-padding-right">文章作者</label>
                                <div class="col-sm-6">
                                    <input class="form-control" id="author" placeholder="" name="author"  type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="keywords" class="col-sm-2 control-label no-padding-right">关键字</label>
                                <div class="col-sm-6">
                                    <input class="form-control" id="keywords" placeholder="" name="keywords"  type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="desc" class="col-sm-2 control-label no-padding-right">文章描述</label>
                                <div class="col-sm-6">
                                    <textarea name="desc" id="desc" class="form-control"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="pic" class="col-sm-2 control-label no-padding-right">缩略图</label>
                                <div class="col-sm-6">
                                    <input id="pic" placeholder="" name="pic"  type="file">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="cataid" class="col-sm-2 control-label no-padding-right">所属栏目</label>
                                <div class="col-sm-6">
                                    <select name="cataid" id="cataid">
                                        <option value="">请选择栏目</option>
                                        {volist name="catares" id="vo"}
                                        <option value="{$vo.cataid}">{$vo.cataname}</option>
                                        {/volist}
                                    </select>
                                </div>
                                <p class="help-block col-sm-4 red">* 必填</p>
                            </div>
                            <div class="form-group">
                                <label for="group_id" class="col-sm-2 control-label no-padding-right">是否推荐</label>
                                <div class="col-sm-6">
                                    <label>
                                        <input class="checkbox-slider colored-darkorange" name="state" type="checkbox">
                                        <span class="text"></span>
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="group_id" class="col-sm-2 control-label no-padding-right">文章内容</label>
                                <div class="col-sm-6">
                                    <label>
                                        <textarea name="content"  id="content"></textarea>
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="submit" class="btn btn-default">保存信息</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
{/block}
{block name="js"}
<script type="text/javascript" src="__PUBLIC__/admin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    UE.getEditor('content',{initialFrameWidth:1000,initialFrameHeight:400,});
</script>

{/block}
